odHideStub =
{
   load : function()
   {
      // Hide Left Nav
      var nodes = document.getElementsByClassName("lftnav");
      for (var i = 0; i < nodes.length; i ++ )
      {
         nodes[i].parentNode.removeChild(nodes[0]);
      }

      // Hide Stub Hub List
      var sh = document.getElementById("stubhub-results");
      if (sh.value !== "")
      {
         sh.parentNode.removeChild(sh);
         sh = document.getElementById("stubhub-tab");
         sh.parentNode.removeChild(sh);
      }

      // Prompt for filter text
      var filterText = prompt("Enter search text (optional)");

      // Fix Descriptions
      var iCount = 0;
      var iLow = 999999;
      var iCurrent = 0;
      var titles = document.getElementsByClassName("ebay-item-info");
      for (i = (titles.length - 1); i > - 1; i -- )
      {
         titles[i].innerHTML = titles[i].getAttribute("ititle");

         // Filter results if requested
         if (filterText !== null && filterText !== "")
         {
            filterText = filterText.toUpperCase();
            var s = titles[i].innerHTML;
            var par = titles[i].parentNode;
            par = par.parentNode;
            s = s.toUpperCase();
            if (s.indexOf(filterText) == - 1)
            {
               par.parentNode.removeChild(par);
            }
            else
            {
               iCount ++ ;
               var prices = par.getElementsByClassName("price bold");
               s = prices[0].innerHTML;
               s = s.replace("$", "");
               s = s.replace(",", "");
               iCurrent = parseInt(s);
               if (iCurrent > 0 && iCurrent < iLow)
               {
                  iLow = iCurrent;
               }
            }
         }
      }

      // Update Counts if filtered
      if (filterText !== null && filterText !== "")
      {
         var ticks = document.getElementsByClassName("num-tickets");
         for (i = 0; i < ticks.length; i ++ )
         {
            ticks[i].innerHTML = "";
            ticks[i].parentNode.innerHTML = "<span class=\"num - tickets\">" + iCount.toString() + "</span> from $" + iLow.toString();
         }
      }

   }
}
;
odHideStub.load();
